package datamodels

type User struct {
	ID int64 `json:"id" miaosha:"id" gorm:"primaryKey;column:id"`
	NickName string `json:"nickName" miaosha:"nickName" validate:"required" gorm:"column:nickName"`
	UserName string `json:"userName" miaosha:"userName" validate:"required" gorm:"column:userName"`
	Password string `json:"-" miaosha:"password" validate:"required" gorm:"column:password"`
	Ip string `json:"ip" gorm:"column:ip"`

}

// gorm自定义表名
func (u *User) TableName() string {
	return "users"
}

